﻿@model List<S4Store.Models.Chart.RedGreenIndex>
@{
    Layout = null;
    ViewBag.Title = "RedGreenIndex";
}
<div>
    <div style=" margin-left:70px; overflow:hidden">
        <table style="width:100%">
            <tr>
            @for (int i = 0; i < Model.Count; i++)
            {
                
                var m = Model[i];
                if (m.Hide)
                {
                    <td align="center" width="30"><a style="width:50px; display:inline-block"></a></td>
                    continue;
                }
                var classfront = "big";
                var classend = "green";
                if (m.Size == S4Store.Models.Chart.RedGreenIndex.IndexSize.Big)
                {
                    classfront = "big";
                }else if(m.Size == S4Store.Models.Chart.RedGreenIndex.IndexSize.Middle)
                {
                    classfront = "middle";
                }else if(m.Size == S4Store.Models.Chart.RedGreenIndex.IndexSize.Small)
                {
                    classfront = "small";
                }
                if (m.Type == S4Store.Models.Chart.RedGreenIndex.IndexType.Red)
                {
                    classend = "red";
                }
                <td align="center" width="30">
                    <a class="@classfront@classend" title="@m.Title" @if (!String.IsNullOrEmpty(m.Url)) {
                                                    <text>href="@m.Url" tip="@m.Tip"  target="navtab"</text>
                                                    }>
                    @if (!String.IsNullOrEmpty(m.Value))
                    {
                        <text>@m.Value</text>
                    }
                    </a>
                </td>
            }
            </tr>
        </table>
    </div>
</div>

